<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <script src="/kissy/build/seed.js" charset="utf-8"></script>
    <script src="/kissy/src/package.js"></script>
    <script src="/kissy/src/log.js"></script>
</head>
<body>

<h1>open in ios safari test tap event</h1>

<a href="http://www.g.cn" id="goto">google</a>

<a href="http://www.g.cn" id="goto2">google2</a>

<div id='t'  style='border:1px solid green;width:100px;height:100px;margin:10px'>
    tttt ttttt ttttt tttttt tttttt
</div>

<div id='t2' style='border:1px solid red;width:100px;height:100px;margin:10px'>
    t2t2t2t2t 2t2t2t2t2t 2t2t2t2t 2t2t2
</div>

<button id="detach">detach t2</button>
<div style="height: 900px;"></div>
<script>
    KISSY.use('event,node', function (S, Event) {
        var $ = S.all,t;

        $('#goto').on('tap',function(e){
            e.preventDefault();
            log('goto tap');
        });

        Event.on('#t', "click tap", function (e) {
            log("t: " + e.type);
        });

        Event.on('#t2', "tap", t=function (e) {
            log("t2: " + e.type);
        });

        Event.on('#detach', 'click', function () {
            Event.detach('#t2', "tap", t);
        });

        alert('ok');
    });
</script>
</body>
</html>